// call 改变this执行
// 利用call改变this指向
let geyao = {
  name: "geyao",
  age: 18,
};

let fangfang = {
  name: "fangfang",
  age: 18,
};

Function.prototype.myCall = function (context,...args) {
  context = context || window;
  context.fn = this;
  var result = context.fn(...args);
  delete context.fn;
  return result;

 
};

function show(sex) {
  console.log(this.name+ "是" + this.age,'性别'+sex,'棒棒哒');
}


show.myCall(geyao,"男");
